#include <glib.h>

int main(int argc,char *argv[])
{
	GHashTable *t = g_hash_table_new(g_str_hash, g_str_equal);

	g_hash_table_insert(t, "Virginia", "Richmond");
	g_hash_table_insert(t, "Texas", "Austin");
	g_hash_table_insert(t, "Ohio", "Columbus");
	g_hash_table_insert(t, "Number", GSIZE_TO_POINTER(50));

	g_message("There are %d keys in the hash", g_hash_table_size(t));

	g_message("The capital of Texas is %s", (gchar *)g_hash_table_lookup(t, "Texas"));

	gboolean found = g_hash_table_remove(t, "Virginia");
	g_message("The value Virginia was %s found and remove", found?"":"not");

	g_message("The Number is : %ld", GPOINTER_TO_SIZE(g_hash_table_lookup(t, "Number")));

	g_hash_table_remove_all(t);
	g_hash_table_destroy(t);
	return 0;
} 
